<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="<?php echo site_url("style.css"); ?>" type="text/css" />
<title>Series List</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>

<body>
<div id="main">
<div align="center">
<table width="60%">
<tr><td align="center" bgcolor="#404040">Series ID</td><td align="center" bgcolor="#404040">Series</td></tr>
<?php

	function processRow($count)
	{
		switch($count){
			   case 1:
					$color = "#000";
					break;
			   case 2:
					$color = "#404040";
					break;
			   default:
					$color = "#000";
		}
		return $color;
	}

	$count = 0;
		// Fetch and print all the records.
	foreach($list as $row){
		$count = $count + 1;
		$bg = processRow($count);
		echo "<tr><td width=\"10%\" bgcolor=\"$bg\" align=\"center\">$row->s_id</td><td bgcolor=\"$bg\" align=\"center\">$row->name</td></tr>";
		if($count == 2){
			$count = 0;
		}
	}

?>
</table>
</div></div>
</body>
</html>